package com.deer.wms.system.manage.dao;

import com.deer.wms.project.root.mapper.SuperMapper;
import com.deer.wms.system.manage.model.organization.UserOrganization;
import com.deer.wms.system.manage.model.organization.UserOrganizationCriteria;
import com.deer.wms.system.manage.model.organization.UserOrganizationDto;

import java.util.List;

/**
 * @author guo
 */
public interface UserOrganizationMapper extends SuperMapper<UserOrganization> {

    /**
     * 按照criteria条件查询
     * @param criteria criteria
     * @return List<UserOrganizationDto>
     */
    List<UserOrganizationDto> findList(UserOrganizationCriteria criteria);

    /**
     * 通过用户ID删除对应数据
     * @param userId 用户ID
     */
    void deleteByUserId(Integer userId);

    /**
     * 通过货主ID删除对应数据
     * @param organizationId 货主ID
     */
    void deleteByOrganizationId(Integer organizationId);
}